#pragma once

#include <string>

#include "Level.h"

#define Conf_LevelElementSize	20

#define Conf_Stone1				"st1"
#define Conf_Apple				"o"
#define Conf_GhostGene			"G"
#define Conf_Pacman				"C"
#define Conf_Nothing			"-"
#define ConfPart_Property		"[Property Begin]"
#define ConfPart_Level			"[Level Begin]"
#define ConfPart_End			"[End]"

class ConfigurationManager
{
private:
	int IsIgnorable(std::string& pLine);
	void Trim(std::string& pLine);
	void CreateGhostsInLevel(Level* pLevel, int pNbGhost);
	int ExtractLevelElementInLine(std::string& pLine, std::string& pLevelElement);
	void SetPropertyInLevel(std::string& pLine, Level* pLevel);
	void PushObjectsInLevel(std::string& pLine, Level* pLevel, int pY);
public:
	ConfigurationManager(void);
	~ConfigurationManager(void);

	Level* CreateLevel(const std::string& Filename);
};
